Skip to content

fix(mobile): apply Android language changes immediately - #38982

Open
qi-hey wants to merge 6 commits into
pingdotgg:mainfrom
qi-hey:codex/fix-android-language-switch
Open

qi-hey wants to merge 6 commits into
pingdotgg:mainfrom
qi-hey:codex/fix-android-language-switch

Conversation

@qi-hey

@qi-hey qi-hey commented Nov 19, 2026 •

Copy link
Copy Markdown

Problem

On Android 2.3.0 (803), open Settings → General → Language and select Simplified Chinese. The picker shows Chinese as selected while General, Pull requests, and the tab labels still render in English. NativeGTProvider creates a condition store with the selected locale and immediately reads it back. Android queues the void TurboModule write, so that read can return the previously stored locale.

Change

Patch the pinned gt-react-native condition store to use the resolved locale in memory for immediate reads and continue persisting it through the native store. Cover the constructor path the provider uses with the real dependency and a simulated queued Android bridge write.

Scope

Small fix for the Android language selection regression. The app already ships the Chinese catalog and saves the user's selection.

Verification

  • The same regression test failed on upstream main at e0f5acd1 (General) and passed with the patch (通用) when the native write was still pending.
  • vp run check:changed passed. A separate run of preferences.test.ts hit the same Vitest setup error on both branches.
  • Expo Android prebuild and Gradle :app:assembleRelease succeeded locally for an ARM64 preview APK with CMake 3.31.6 and a short native staging path on Windows. apksigner verify passed, and the APK contains the production Hermes bundle with the patched condition store. The package ID is com.t3tools.t3code.preview.
  • On-device verification is pending because no Android test device was available on this workstation.

Implemented with OpenAI GPT-6 in Codex desktop.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. labels Nov 19, 2026
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The native condition store now keeps its resolved locale in instance state across the TypeScript, CommonJS, and module builds. Android workspace navigation accepts localized tab and new-thread titles, which the React Native view supplies.

Changes: Native locale handling

Layer / File(s) Summary
Store resolved locale across builds
patches/gt-react-native@11.4.18.patch, pnpm-workspace.yaml, apps/mobile/src/i18n/native-locale.test.ts
The store initializes and updates an instance locale, and getLocale() returns that value. The workspace pins gt-react-native to 11.4.18 and registers the patch. A subprocess test applies deferred mocked Android storage writes, then checks the locale reported by a store initialized with zh.

Android navigation labels

Layer / File(s) Summary
Pass localized titles to native navigation
apps/mobile/src/features/layout/workspace/AndroidWorkspaceNavigation.android.tsx, apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt
The React Native view passes translated tab titles, an expanded “Pull requests” title, and a translated “New thread” title to the Android view. The Android view uses configured titles when available and retains its existing fallback labels.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant AndroidWorkspaceNavigation
  participant T3WorkspaceNavigationModule
  participant NavigationRail
  AndroidWorkspaceNavigation->>T3WorkspaceNavigationModule: Pass translated navigation titles
  T3WorkspaceNavigationModule->>NavigationRail: Render configured titles when available
Loading

Suggested reviewers: flamboh, juliusmarminge

Merge Risk: Minimal · up to d5252 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(mobile): apply Android language changes immediately" names the main change: Android language selection now takes effect right away. It follows conventional commit form. The changeset pa…
Description check Passed The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section gives the reproduction environment and expected behavior. The Change section explains the p…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(mobile): apply Android language changes immediately" names the main change: Android language selection now takes effect right away. It follows conventional commit form. The changeset patches the gt-react-native condition store to use the resolved locale in memory, and the Android navigation labels are localized too, so the title covers the primary fix without listing every file.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section gives the reproduction environment and expected behavior. The Change section explains the patch to the condition store. The Scope section states this is a small regression fix and notes the app already ships the Chinese catalog. Verification lists focused test results, build checks, and a clear statement that on-device verification is pending. Two gaps remain: Scope does not link an issue number, and the description does not mention the separate Android navigation localization change that the diff includes. The description also omits the agent model line, though the template asks for it, and it does state the model (GPT-6 in Codex desktop).

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 471c5b8 and d525204.

Files selected for processing: 2

  • apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt
  • apps/mobile/src/features/layout/workspace/AndroidWorkspaceNavigation.android.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 19, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

the proof could not be captured: the agent ran past its 120 minutes

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

See the conflict window.

@github-actions github-actions Bot added the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 23, 2026
@juliusmarminge juliusmarminge added takeover:in-progress A takeover lead is working on this PR and removed takeover:blocked Takeover blocked; reason in the PR body labels Nov 23, 2026
juliusmarminge and others added 2 commits November 23, 2026 05:53
…guage-switch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lockfile-free release installs could otherwise resolve past the patched version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The native Android navigation bar and rail hardcoded English tab titles,
so a language change never reached them. Pass the translated titles from
React Native instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. size:L 100-499 changed lines (additions + deletions). takeover:in-progress A takeover lead is working on this PR vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants